home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / infop125.arc / PAGE_08.INC < prev    next >
Text File  |  1991-04-28  |  3KB  |  136 lines

  1. procedure page_08;
  2.  
  3. const
  4.   tick2 = 115200;
  5.  
  6. var
  7.   i : byte;
  8.   xbyte1 : byte;
  9.   xbyte2 : byte;
  10.   xword : word;
  11.  
  12. begin
  13.   window(1, 3, 30, tlength - 2);
  14.   caption2('Printers');
  15.   xbyte1:=equip and $C000 shr 14;
  16.   writeln(xbyte1);
  17.   if xbyte1 > 0 then begin
  18.     caption3('Device');
  19.     writeln;
  20.     caption3('Base port');
  21.     writeln;
  22.     caption3('Timeout');
  23.     writeln;
  24.     caption3('Busy');
  25.     writeln;
  26.     caption3('ACK');
  27.     writeln;
  28.     caption3('Paper out');
  29.     writeln;
  30.     caption3('Selected');
  31.     writeln;
  32.     caption3('I/O error');
  33.     writeln;
  34.     caption3('Timed out');
  35.     for i:=1 to xbyte1 do begin
  36.       window(9 + 6 * i, 4, 15 + 6 * i, tlength - 2);
  37.       writeln('LPT', i);
  38.       writeln('$', hex(memw[BIOSdseg : 2 * i + 6], 3));
  39.       writeln(mem[BIOSdseg : $0077 + i]);
  40.       with regs do begin
  41.         AH:=$02;
  42.         DX:=0;
  43.         intr($17, regs);
  44.         yesorno(AH and $80 = $00);
  45.         yesorno(AH and $40 = $40);
  46.         yesorno(AH and $20 = $20);
  47.         yesorno(AH and $10 = $10);
  48.         yesorno(AH and $08 = $08);
  49.         yesorno(AH and $01 = $01)
  50.       end
  51.     end
  52.   end;
  53.   window(twidth - 42, 3, twidth, tlength - 2);
  54.   caption2('Serial ports');
  55.   xbyte1:=equip and $0E00 shr 9;
  56.   writeln(xbyte1);
  57.   if xbyte1 > 0 then begin
  58.     if xbyte1 > 4 then
  59.       xbyte1:=4;
  60.     caption3('Device');
  61.     writeln;
  62.     caption3('Base port');
  63.     writeln;
  64.     caption3('Timeout');
  65.     writeln;
  66.     caption3('Baud rate');
  67.     writeln;
  68.     caption3('Data bits');
  69.     writeln;
  70.     caption3('Parity');
  71.     writeln;
  72.     caption3('Stop bits');
  73.     writeln;
  74.     caption3('Break');
  75.     writeln;
  76.     caption3('RLSD');
  77.     writeln;
  78.     caption3('RI');
  79.     writeln;
  80.     caption3('DSR');
  81.     writeln;
  82.     caption3('CTS');
  83.     writeln;
  84.     caption3('dRLSD');
  85.     writeln;
  86.     caption3('-dRI');
  87.     writeln;
  88.     caption3('dDSR');
  89.     writeln;
  90.     caption3('dCTS');
  91.     for i:=1 to xbyte1 do begin
  92.       window(twidth - 35 + 7 * i, 4, twidth - 28 + 7 * i, tlength - 2);
  93.       writeln('COM', i);
  94.       xword:=memw[BIOSdseg : 2 * i - 2];
  95.       writeln('$', hex(xword, 3));
  96.       writeln(mem[BIOSdseg : $007B + i]);
  97.       xbyte2:=port[xword + 3];
  98.       port[xword + 3]:=xbyte2 or $80;
  99.       writeln(tick2 / cbw(port[xword], port[xword + 1]) : 0 : 0);
  100.       port[xword + 3]:=xbyte2;
  101.       case xbyte2 and $03 of
  102.         $00 : writeln('5');
  103.         $01 : writeln('6');
  104.         $02 : writeln('7');
  105.         $03 : writeln('8')
  106.       end;
  107.       case xbyte2 and $38 of
  108.         $00, $10, $20, $30 : writeln('none');
  109.         $08 : writeln('odd');
  110.         $18 : writeln('even');
  111.         $28 : writeln('mark');
  112.         $38 : writeln('space')
  113.       end;
  114.       case xbyte2 and $07 of
  115.         $00..$03 : writeln('1');
  116.         $04 : writeln('1.5');
  117.         $05..$07 : writeln('2')
  118.       end;
  119.       yesorno(xbyte2 and $40 = $40);
  120.       with regs do begin
  121.         AH:=$03;
  122.         DX:=i - 1;
  123.         intr($14, regs);
  124.         yesorno(AL and $80 = $80);
  125.         yesorno(AL and $40 = $40);
  126.         yesorno(AL and $20 = $20);
  127.         yesorno(AL and $10 = $10);
  128.         yesorno(AL and $08 = $08);
  129.         yesorno(AL and $04 = $04);
  130.         yesorno(AL and $02 = $02);
  131.         yesorno(AL and $01 = $01)
  132.       end
  133.     end
  134.   end
  135. end;
  136.